home *** CD-ROM | disk | FTP | other *** search
/ Robotics & Artificial Int…3 (Professional Edition) / Robotics & Artificial Intelligence Tools 2003 (Professional Edition).iso / neural network tool and application / nsinstall.exe / data1.cab / DllSys_Files / SCHEDULE / LINEARS.C < prev    next >
Encoding:
C/C++ Source or Header  |  2002-03-08  |  1.0 KB  |  37 lines

  1. // Dynamic link library implementation of NeuroSolutions LinearScheduler component 
  2.  
  3. #include "NSDLL.h" 
  4.  
  5. /***********************************/
  6. /* Forward activation of component */
  7.  
  8. __declspec(dllexport) void performScheduler(
  9.     DLLData    *instance,    // Pointer to instance data (may be NULL)
  10.     NSFloat    *data,        // Pointer to the data to be scheduled
  11.     int    length,        // Number of elements in the scheduled data vector
  12.     NSFloat    beta        // Scheduler parameter controlled by user in components inspector
  13.     )
  14. {
  15.     int i;
  16.  
  17.     for (i=0; i<length; i++)
  18.         data[i] += beta;
  19. }
  20.  
  21. /******************************************/
  22. /* Management of instance data (OPTIONAL) */
  23. /*
  24. __declspec(dllexport) DLLData *allocScheduler(
  25.     DLLData    *oldInstance,    // Pointer to the last instance if reallocating
  26.     int     length        // Number of elements in the scheduled data vector
  27.     )
  28. {
  29.     DLLData *instance = allocDLLInstance(oldInstance);
  30.     return instance;
  31. }
  32.  
  33. __declspec(dllexport) void freeScheduler(DLLData *instance)
  34. {
  35.     freeDLLInstance(instance);
  36. }
  37. */